﻿<%@ Control Language="c#" AutoEventWireup="false" Inherits="Web.Control.WWW.Session.Session" %>
<input type="hidden" id="op" name="op" value="" style="display:none"/>
<input type="hidden" id="tToSDesc" name="tToSDesc" value="" style="display:none"/>
<div style="width:100%; text-align:left">
	<div id="new_body">
		<div id="body_900">
			<div id="body_left"></div>
			<div id="body_main">
				<div class="submenuN">
					<div class="submenuN_position">
						<div class="submenuN_title">
							<div class="submenuN_Btitle">
								<h1>Session Detail</h1>
							        <h4>Session ID: <%=sid%></h4>
							    <div class="session_active">
									<div><strong><%=GetText("Action Required") %></strong></div>
							        <p><%=GetStateText()%></p>
									<hr size="1" color="#cccccc" />
									<p><ul class="session_time"><%=GetAgreedText() %></ul></p>
							    </div>
							</div>
						</div>
					</div>
				</div>
				<div>
					<ul class="sort_sel">
						<li class="first selATags" style="cursor:pointer" id="selAgreement" onclick="SelAOrL(1)"><a href="#"><span>Agreement</span></a></li>
						<li class="" style="cursor:pointer" id="selLesson" <%=SM.SessionType=="1"?"onclick='SelAOrL(2)'":"" %>><a href="#"><span>Lesson</span></a></li>						                
					</ul>
					<div class="clear"></div>
				</div>
				<div class="Center9001n">
					<div class="Center9001Left"></div>
					<div class="Center9001Right">
							<div class="center9001content">
							    <div class="teach_area">
							        <div id="AgreementID">
							            <div>
									        <div class="floatl" style="width:305px">
										        <span class="grey12"><%=GetText("Student")%></span>
										        <div class="teacher_profile">										    
											        <div class="floatl" style="width:60px"><a href="<%=WWWHost %>/<%=SM.SNO %>.htm" title="<%=SM.SNickname %>"><img src="<%=SM.SAvatar %>" width="50" height="50" border="0" /></a></div>
													<div class="floatl"><a href="<%=WWWHost %>/<%=SM.SNO %>.htm"><%=SM.SNickname %></a></div>
											        <div class="clear"></div>
										        </div>
									        </div>
									        <div class="floatr" style="width:305px; margin-left:15px">
										        <span class="grey12"><%=GetText("Teacher")%></span>
										        <div class="teacher_profile">
											        <div class="floatl" style="width:60px"><a href="<%=WWWHost %>/<%=SM.TNO %>.htm" title="<%=SM.TNickname %>"><img src="<%=SM.TAvatar %>" width="50" height="50" border="0" /></a></div>
													<div class="floatl"><a href="<%=WWWHost %>/<%=SM.TNO %>.htm"><%=SM.TNickname %></a></div>
											        <div class="clear"></div>
										        </div>
									        </div>
									        <div class="clear"></div>
								        </div>
										<p class="hover18b"><%=SM.SessionType == "1" ? "<a href='" + WWWHost + "/course/"+SM.CID.ToString()+"'>" + Lx.Web.Common.UI.Globals.HtmlStrippedText(SM.CTitle) + "</a>" : GetText("One-on-one tutoring")%></p>
								        <div>
								            <table width="590" border="0" cellpadding="5" cellspacing="1">
								            <%=SM.SessionType == "1" ? "<tr><td>"+GetText("Which lesson?")+"</td><td><a href='" + WWWHost + "/lesson/" + SM.LID.ToString() + "'>" + GetText("Lesson {0}: {1}", new string[] { SM.LChapter.ToString(), Lx.Web.Common.UI.Globals.HtmlStrippedText(SM.LTitle) }) +"</a></td></tr>" : ""%>
								                <tr>
								                    <td>Tuition Day & Time the student requested</td>
								                    <td>
								                        <%=BLF.WWW_User.Teach.Teach.ConvertTime(SM.StartDate, SM.StartTime, Timezone).ToString(TimeToString1, CurLan)%> - <%=BLF.WWW_User.Teach.Teach.ConvertTime(SM.StartDate, SM.StartTime, Timezone).AddMinutes(SM.LongTime*30).ToString("HH:mm")%> <span class="grey12"><%=GetTimezoneText(Timezone)%></span>
								                        <%=(UserType == "1"&&SM.State == "3" && (SM.TMark.IndexOf('1') > -1 || SM.TMark.IndexOf('2') > -1))?GetText("老师已修改此信息"):""%>
								                    </td>
								                </tr>
								                <tr>
								                    <td>Credit Price</td>
								                    <td>ITC <%=SM.Price.ToString("N0")%> / hour, total ITC <%=((decimal)(SM.Price * ((decimal)SM.LongTime / 2))).ToString("N0")%>
								                        <%=(UserType == "1"&&SM.State == "3" && SM.TMark.IndexOf('3') > -1)?GetText("老师已修改此信息"):""%>
								                    </td>
								                </tr>
								                <tr>
								                    <td valign="top">Connect Using</td>
								                    <td><img src="/Images/IMIcons/IMTool_<%=SM.TeachTool%>.gif" align="absmiddle" /> <%=BLF.WWW_User.Users.User.GetIMToolText(SM.TeachTool)%> <span class="grey12">(<%=SM.AudioType == "1" ? GetText("Audio only") : GetText("Audio/ Video")%>)</span><p>- <%=GetText("Student IM:")%> <%=IMAccountList[0]%></p><p>- <%=GetText("Teacher IM:")%> <%=IMAccountList[1]%></p>
							                      </td>
								                </tr>
								                <tr>
								                    <td valign="top"><%=GetText("Languages") %></td>
								                    <td><%=GetText("Teaching") %> <%=BLF.StaticData.GetLanguageText(SM.LanguageLearn)%><p><%=GetText("Using ")%><%=BLF.StaticData.GetLanguageText(SM.BaseLanguage)%></p></td>
								                </tr>
							              </table>
								        </div>
								    </div>
								    <div id="LessonID" style="display:none"></div>   
									<div class="session_rec">
										<h3><%=GetText("Session Record")%></h3>
										<div><ul><%foreach (Model.WWW_User.Teach.History his in HistoryList) { Response.Write(GetHistoryText(his.State, his.HappenDate)); } %></ul></div>
									</div>
									<div class="session_mes">
										<h3>Messages</h3>											
											<ul class="session_wall" id="MessagesID">
											<asp:Repeater ID="rptMsg" runat="server">
											<ItemTemplate>
												<li><%#Lx.Web.Common.UI.Globals.HtmlStrippedText(Eval("content").ToString())%><br /><span class="grey11"><a href="<%#WWWHost %>/<%#Eval("userFrom") %>.htm"><%#Eval("nickname")%></a> <%#FormatDiffDate(C0036, Eval("DiffDate").ToString())%></span></li>
											</ItemTemplate>
											</asp:Repeater>	
											</ul>
										<p><textarea id="tMessage" style="width:625px" rows="3"></textarea></p>
										<p><input class="button" type="button" value="Save" onclick="AddMessage()" /></p>
									</div>
							    </div>
							</div>
					</div>
					<div class="clear"></div>
				</div>
			</div>
			<div id="body_right"></div>
			<div class="clear"></div>
		</div>
		<div id="body_900F"></div>
	</div>
</div>
<ul id="MessageItem" style="display:none">
    <li>$content$<br /><span class="grey11"><a href="<%=WWWHost %>/$userFrom$.htm">$nickname$</a> $DiffDate$</span></li>    
</ul>
<script>
var LID=<%=SM.LID%>;
var LTile = '<%=SM.LChapter.ToString() %> <%=Lx.Web.Common.UI.Globals.HtmlStrippedText(SM.LTitle)%>';
var CTile = "<%=GetText("{0} by {1}", new string[] { "<a href=\'/course/" + SM.CID.ToString() + "\'>" + Escape(Lx.Web.Common.UI.Globals.HtmlStrippedText(SM.CTitle)) + "</a>", "<a href=\'/" + SM.TNO + ".htm\'>" + Escape(SM.TNickname) + "</a>" })%>";
var SID=<%=sid %>;
var gDateFormat="<%=GetText("C0033") %>";
var gStrDate="posted {0} {1} ago";

var Title='<%=GetText("Feedback") %>';
var body="<div class='Popup_content'><textarea id='tareaFeedback'></textarea></div><div class='Popup_button'><input type='button' class='button' value='<%=GetText("Feedback") %>' onclick='FB()'/>&nbsp;&nbsp;<input type='button' class='buttong' value='<%=GetText("C0056") %>' onclick='webFailure()'/></div>";

var op1Title='<%=GetText("Discharge Agreement") %>';
var op1Body="<div class='Popup_content'><%=GetText("Decline the agreement with {0}?",new string[]{Escape(SM.TNickname)}) %></div><div class='Popup_button'><input type='button' class='button' value='<%=GetText("Discharge Agreement")%>' onclick='executeOP()'/>&nbsp;&nbsp;<input type='button' class='buttong' value='<%=GetText("C0056") %>' onclick='webFailure()'/></div>";

var op4Title='<%=GetText("Decline Agreement") %>';
var op4Body="<div class='Popup_content'><%=GetText("Decline the agreement with {0}?",new string[]{Escape(SM.SNickname)}) %></div><div class='Popup_button'><input type='button' class='button' value='<%=GetText("Decline Agreement")%>' onclick='executeOP()'/>&nbsp;&nbsp;<input type='button' class='buttong' value='<%=GetText("C0056") %>' onclick='webFailure()'/></div>";

var op5Title='<%=GetText("确认") %>';
var op5Body="<h4><a href='' target='_blank'>Terms of Service</a></h4><p>I (student) understand that if the teacher agrees to the terms I have outlined above, I agree for italki to bill my account.<br />If I do not have enough credit in my italki account, I will send payment immediately.</p>";
</script>